-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add eslint-plugin-perfectionist
and eslint-plugin-react-perf
to the base and /react
configs, respectively
#20
Conversation
eslint-plugin-react-perf
to the /react
config and all its dependent configseslint-plugin-perfectionist
and eslint-plugin-react-perf
to the base and /react
configs, respectively
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some notes for context:
"perfectionist/sort-imports": [ | ||
"error", | ||
{ | ||
"environment": "bun", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
environment
switched to Bun so bun:*
imports work (e.g. bun:test
) without any more hacks (e.g. the settings:
section that I removed in this PR)
"perfectionist/sort-imports": [ | ||
"error", | ||
{ | ||
"environment": "node", | ||
"groups": [ | ||
["side-effect", "side-effect-style"], | ||
["builtin", "external"], | ||
["index", "internal", "parent", "sibling", "unknown"], | ||
["type"], | ||
["object"] | ||
], | ||
"newlines-between": "always" | ||
"object", | ||
[ | ||
"builtin-type", | ||
"external-type", | ||
"index-type", | ||
"internal-type", | ||
"parent-type", | ||
"sibling-type", | ||
"type" | ||
], | ||
"style" | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a huge upside to these are they are now auto-fixable with eslint-plugin-perfectionist
, so you can fix your whole codebase with one command (e.g. eslint --fix
)
"extends": [ | ||
"eslint-config-airbnb", | ||
"airbnb/hooks", | ||
"plugin:jsx-a11y/recommended", | ||
"plugin:react-perf/recommended", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice performance recommendations here for React apps
@@ -192,26 +192,26 @@ export { | |||
anError, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
text fixes from here down
Pull Request Checklist
package.json
following Semantic VersioningChanges Included
2.1.0
eslint-plugin-perfectionist
to the base configuration and all its dependent configurationsimport/order
,sort-keys
, andsort-vars
eslint-plugin-react-perf
to the/react
configuration and all its dependent configurations1.1.17
to1.1.27